package com.cctc.rds.nrpc.demo.rpc.impl;

import com.cctc.rds.nrpc.demo.rpc.HelloRpc;
import com.cctc.rds.nrpc.demo.rpc.HelloRpcResponse;
import com.cctc.rds.nrpc.demo.rpc.HelloRpcReuqest;

public class HelloRpcResponseImpl implements HelloRpc {
    @Override
    public HelloRpcResponse sum(HelloRpcReuqest helloRpcReuqest) {
        HelloRpcResponse response = HelloRpcResponse.builder().build();
        int a = helloRpcReuqest.getA();
        int b = helloRpcReuqest.getB();
        int sum = a + b;
        response.setSum(sum);
        return response;
    }
}
